//package com.ruoyi.rabbitmq;
//
//import com.ruoyi.common.rabbitmq.CustomMessage;
//import com.ruoyi.common.rabbitmq.RabbitMqProducer;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//@RestController
//@RequestMapping("/message")
//public class MessageController {
//
//    @Autowired
//    private RabbitMqProducer producer;
//
//    @GetMapping("/send")
//    public String sendMessage(@RequestParam String msg) {
//        producer.sendMessage(msg);
//        return "Message sent: " + msg;
//    }
//
//    @PostMapping("/sendObj")
//    public String sendMessage(@RequestBody CustomMessage customMessage) {
//        producer.sendObjectMessage(customMessage);
//        return "Message sent: " + customMessage.toString();
//    }
//
//}
//
